/**
 * @ Author:Yoann Meclot. MSay2
 * @ Created on:2020-06-04 05:54:17
 * @ Modified on: 2021-06-14 19:07:40
 */
/**
 * Copyright (c) 2020-2021 MSay2 (Yoann Meclot) - @msay2/tspoet
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * Public constants for type of inversement of the map.
 *
 * @class MapType
 * @version 1.0
 * @since 1.0
 */
export declare abstract class MapType
{
    /**
     * Reverse only keys
     *
     * @constant TYPE_KEYS
     * @type {number}
     * @since 1.0
     */
    public static TYPE_KEYS:number;
    /**
     * Reverse only values
     *
     * @constant TYPE_VALUES
     * @type {number}
     * @since 1.0
     */
    public static TYPE_VALUES:number;
}
/**
 * The LinkedMap tool allows you to manipulate a map containing keys and values.
 *
 * LinkedMap is a way to create and manage a associative array.
 *
 * @class Map
 * @version 1.8
 * @since 1.0
 */
export declare abstract class Map
{
    /**
     * Init a new object map of your primitives arrays keys and values.
     *
     * @param keys The primitive array keys.
     * @param values The primitive array values.
     * @returns Return the newst map.
     * @type {Map}
     * @since 1.6
     */
    public static from(keys:string[], values:object[]):Map;
    
    /**
     * Init a new object map of your primitive object.
     *
     * @param object Your primitive object.
     * @returns Return the newest map.
     * @type {Map}
     * @since 1.6
     */
    public static fromObject(object:{}):Map;
    
    /**
     * Return the size of map
     *
     * @returns return the size of the map
     * @type {number}
     * @since 1.0
     */
    public abstract length():number;
    
    /**
     * Check if the value exists in the map
     *
     * @param value the specified value
     * @returns return true if the occurrence is existing in the map
     * @type {boolean}
     * @since 1.0
     */
    public abstract containsValue(value:Object):boolean;
    
    public abstract containsKey(key:string):boolean;
    
    /**
     * Return the key of the finded occurrence in the map
     *
     * @param value value whose the key in the map is to be finded
     * @returns return null if the map does not contain the occurrence
     * @type {String | null}
     * @since 1.2
     */
    public abstract keyOf(value:Object):String | null;
    
    /**
     * Add a specific value and associates with the specified key in this map
     *
     * @param key key with which the specified value is to be associated
     * @param value value to be associated with the specified key
     * @type {void}
     * @throws MaximumCapacityException when you have reached the maximum capacity of elements that the map can contain
     * @throws IllegalArgumentException if the key is not a String type
     * @throws NullPointerException if the key is null or empty
     * @throws IllegalArgumentException if the key is already existing in the map
     * @since 1.5
     */
    public abstract add(key:String, value:Object):void;
    
    /**
     * Add a specific value onnly if the value is not in the map and associates with the specified key in this map
     *
     * @todo This is use the default implementation of (#method Map.add)
     *
     * @param key key with which the specified value is to be associated
     * @param value value to be associated with the specified key
     * @type {void}
     * @throws MaximumCapacityException when you have reached the maximum capacity of elements that the map can contain
     * @throws IllegalArgumentException if the key is not a String type
     * @throws NullPointerException if the key is null or empty
     * @throws IllegalArgumentException if the key is already existing in the map
     * @since 1.5
     */
    public abstract addIfAbsent(key:String, value:Object):boolean;
    
    /**
     * Add all datas of one map in the current map
     *
     * @todo This is use the default implementation of (#method Map.add)
     *
     * @param maps The newests maps to add
     * @type {void}
     * @throws ObjectCastException if the (#param maps) is not not an instance of LinkedMap
     * @throws MaximumCapacityException when you have reached the maximum capacity of elements that the map can contain
     * @throws IllegalArgumentException if the key is not a String type
     * @throws NullPointerException if the key is null or empty
     * @throws IllegalArgumentException if the key is already existing in the map
     * @since 1.5
     */
    public abstract addAll(...maps:Map[]):void;
    
    /**
     * Get the value with the specified keys
     *
     * @param key key with which the specified value is to be associated
     * @returns return the added value specified by its key or return null if the key does not exist on the map
     * @type {Object | null}
     * @since 1.0
     */
    public abstract get(key:String):Object | null;
    
    /**
     * Replace the value by the associated specified key in the map by the new specified value
     *
     * @param key key of value to replace
     * @param value value to be replaced at the place of specified associate key
     * @type {void}
     * @throws IllegalArgumentException if the key does not exist in the map
     * @since 1.5
     */
    public abstract set(key:String, value:Object):void;
    
    /**
     * Remove the value with its associated specified key
     *
     * @param key key of value to remove
     * @type {void}
     * @throws IllegalArgumentException if the key does not exist in the map
     * @since 1.5
     */
    public abstract remove(key:String):void;
    
    /**
     * Clear the map
     *
     * Remove all keys and values
     *
     * @type {void}
     * @since 1.2
     */
    public abstract clear():void;
    
    /**
     * Clear the map
     *
     * Remove all keys and values
     * To avoid memory leaks
     *
     * @type {void}
     * @since 1.0
     */
    public abstract clearMemory():void;
    
    /**
     * Check if the map is empty
     *
     * @return return true if the map is empty and return false if the map is not empty
     * @type {boolean}
     * @since 1.4
     */
    public abstract isEmpty():boolean;
    
    /**
     * Reiterate each entry of the map for obtain the values and keys
     *
     * @return return the entries iterable
     * @type {Iterable<Entry<String, Object>>}
     * @since 1.4
     */
    public abstract entries():Iterable<Map.Entry<String, Object>>;
    
    public abstract entryValues():Iterable<Map.Values<Object>>;
    
    public abstract entriesReverse():Iterable<Map.Entry<String, Object>>;
    
    public abstract join(separator?:string):string;
    
    /**
     * Reverse the map
     *
     * @param type Type of inversement
     * @type {void}
     * @todo (optional) You can try enter a type of inversement
     * @constant MapType.TYPE_KEYS
     * @constant MapType.TYPE_VALUES
     * @example map.reverse() map.reverse(MapType.TYPE_KEYS) map.revers(MapType.TYPE_VALUES)
     * @since 1.3
     */
    public abstract reverse(type?:number):void;
    
    /**
     * Return the map to char string format
     *
     * @return return the map to char string format
     * @type {string}
     * @example
     * Syntax:
     * [
     *  "key1" => "value1",
     *  "key2" => "1",
     *  "key3" => "false",
     *  "key4" => "Object",
     *  "key5" => "1.2"
     * ]
     * @since 1.0
     */
    public abstract toString():string;
    
    /**
     * Return the map to JSON string format
     *
     * @return return the map to JSON format
     * @type {string}
     * @throws IllegalArgumentException if the map contain an object
     * @example
     * Syntax:
     * {
     *  "key1":"value1",
     *  "key2":1,
     *  "key3":false,
     *  "key4":1.2
     * }
     * @since 1.5
     */
    public abstract toJSON():string;
    
    /**
     * Create primitive object of the current keys and values.
     *
     * @param enumerable Set if you want to enumerable properties in newst object.
     * @returns The newest primitve object.
     * @type {Object}
     * @since 1.7
     */
    public abstract toObject(enumerable:boolean):Object;
    
    /**
     * Clone the current object map.
     *
     * @returns Return the newest object map cloned.
     * @type {Map}
     * @since 1.7
     */
    public abstract clone():Map;
    
    /**
     * The Entry class is a mean to log a key associated with its value.
     *
     * The Entry class is used by the EntryIterable class to obtain each entry to the map
     * and obtain each keys and values in a loop.
     *
     * @class Entry<K,V>
     * @version 1.2
     * @since 1.4
     */
    static Entry:{
        new <K extends String, V extends Object>():{
            /**
             * Get the key of the map
             *
             * @returns {String[]} the keys of the map
             * @since 1.0
             */
            getKey():K;

            /**
             * Get the value of the map
             *
             * @return {Object[]} the value of the map
             * @since 1.0
             */
            getValue():V;

            /**
             * Check if the indexing return to the last position.
             *
             * @returns {boolean} return true if the indexing is placed to the last position.
             * @since 1.5
             */
            isLastData():boolean;

            /**
             * Check if the indexing return to the first position.
             *
             * @returns {boolean} return true is the indexing is placed to the first position.
             * @since 1.5
             */
            isFirstData():boolean;
        };
    };
}
/**
 * The LinkedMap tool allows you to manipulate a map containing keys and values.
 *
 * LinkedMap is a way to create and manage a associative array.
 *
 * @class LinkedMap
 * @version 1.8
 * @since 1.0
 */
export declare class LinkedMap extends Map
{
    public constructor();

    public length():number;
    
    public containsValue(value:Object):boolean;
    
    public containsKey(key:string):boolean;
    
    public keyOf(value:Object):String | null;
    
    public add(key:String, value:Object):void;
    
    public addIfAbsent(key:String, value:Object):boolean;
    
    public addAll(...maps:Map[]):void;
    
    public get(key:String):object | null;
    
    public set(key:String, value:Object):void;
    
    public remove(key:String):void;
    
    public clear():void;
    
    public clearMemory():void;
    
    public isEmpty():boolean;
    
    public entries():Iterable<Map.Entry<String, Object>>;
    
    public entryValues():Iterable<Map.Values<Object>>;
    
    public entriesReverse():Iterable<Map.Entry<String, Object>>;
    
    public join(separator?:string):string;
    
    public reverse(type?:number):void;
    
    public toString():string;
    
    public toJSON():string;
    
    public toObject(enumerable:boolean):Object;
    
    public clone():Map;
}

interface IValues<B>
{
    getValue():B;
    isLastData():boolean;
    isFirstData():boolean;
}

export declare namespace Map
{
    type Entry<K extends String, V extends Object> = InstanceType<typeof Map.Entry>;
    type Values<B> = IValues<B>;
}

export { };
//# sourceMappingURL=LinkedMap.d.ts.map